home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 85 / CD Temático 40 Febrero 2004.iso / DOS / testdisk / src / rfs.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-01-09  |  3.0 KB  |  56 lines

  1. /*
  2.  * taken from ReiserFS v0.91. Reiserfs Copyright 1996, 1997, 1998 Hans Reiser
  3.  */
  4.  
  5. #define REISERFS_SUPER_MAGIC        "ReIsErFs"
  6. #define REISERFS2_SUPER_MAGIC        "ReIsEr2Fs"
  7. #define REISERFS3_SUPER_MAGIC        "ReIsEr3Fs"
  8. #define REISERFS_FIRST_BLOCK        8
  9. #define REISERFS_VALID_FS        1
  10. #define REISERFS_ERROR_FS        2
  11. #define REISERFS_MIN_BLOCK_AMOUNT    100
  12.  
  13. struct reiserfs_super_block
  14. {
  15.     __u32 s_block_count;        /* blocks count         */
  16.     __u32 s_free_blocks;        /* free blocks count    */
  17.     __u32 s_root_block;        /* root block number    */
  18.     __u32 s_journal_block;        /* journal block number    */
  19.     __u32 s_journal_dev;        /* journal device number  */
  20.     __u32 s_orig_journal_size;    /* size of the journal on FS creation.  used to make sure they don't overflow it */
  21.     __u32 s_journal_trans_max;    /* max number of blocks in a transaction.  */
  22.     __u32 s_journal_block_count;    /* total size of the journal. can change over time  */
  23.     __u32 s_journal_max_batch;    /* max number of blocks to batch into a trans */
  24.     __u32 s_journal_max_commit_age;    /* in seconds, how old can an async commit be */
  25.     __u32 s_journal_max_trans_age;    /* in seconds, how old can a transaction be */
  26.     __u16 s_blocksize;        /* block size           */
  27.     __u16 s_oid_maxsize;        /* max size of object id array, see get_objectid() commentary  */
  28.     __u16 s_oid_cursize;        /* current size of object id array */
  29.     __u16 s_state;            /* valid or error       */
  30.     char s_magic[10];        /* reiserfs magic string indicates that file system is reiserfs */
  31.     __u16 sb_fs_state;         /* 62 it is set to used by fsck to mark which phase of
  32.                    rebuilding is done (used for fsck debugging) */
  33.     __u32 s_hash_function_code;    /* indicate, what hash fuction is being use to sort names in a directory*/
  34.     __u16 s_tree_height;        /* height of disk tree */
  35.     __u16 s_bmap_nr;        /* amount of bitmap blocks needed to address each block of file system */
  36.     __u16 sb_version;         /* 72 this field is only reliable on
  37.                        filesystem with non-standard journal */
  38.     __u16 sb_reserved_for_journal;  /* 74 size in blocks of journal area on
  39.                        main device, we need to keep after
  40.                        non-standard journal relocation */
  41. /* 76 */     __u32 sb_inode_generation; 
  42. /* 80 */     __u32 s_flags;                /* Right now used only by inode-attributes, if enabled */
  43. /* 84 */    unsigned char s_uuid[16];      /* filesystem unique identifier */
  44. /*100 */    unsigned char s_label[16];     /* filesystem volume label */
  45. /*116 */    char s_unused[88] ;            /* zero filled by mkreiserfs and reiserfs_convert_objectid_map_v1()
  46.                                             * so any additions must be updated there as well. */ 
  47. /*204*/
  48. } __attribute__ ((__packed__));
  49.  
  50. #define SB_SIZE (sizeof(struct reiserfs_super_block))
  51.  
  52. int check_rfs(t_param_disk *disk_car,t_diskext *partition,const int debug);
  53. int recover_rfs(t_param_disk *disk_car, const struct reiserfs_super_block *sb,t_diskext *partition,const int debug, const int dump_ind);
  54. int dir_partition_reiser(WINDOW *window,t_param_disk *disk_car,t_diskext *partition, const int debug);
  55.  
  56.